import request from '@/utils/request'

// 查询教练列表
export function listTrainMan(query) {
  return request({
    url: '/business/trainMan/list',
    method: 'get',
    params: query
  })
}

// 查询教练详细
export function getTrainMan(id) {
  return request({
    url: '/business/trainMan/' + id,
    method: 'get'
  })
}

// 新增教练
export function addTrainMan(data) {
  return request({
    url: '/business/trainMan',
    method: 'post',
    data: data
  })
}

// 修改教练
export function updateTrainMan(data) {
  return request({
    url: '/business/trainMan',
    method: 'put',
    data: data
  })
}

// 删除教练
export function delTrainMan(id) {
  return request({
    url: '/business/trainMan/' + id,
    method: 'delete'
  })
}

// 返回前limit位教练
export function queryHighStarTrainMan(limit) {
  return request({
    url: '/business/trainMan/highStar/list',
    params: {
      limit: limit
    },
    method: 'get'
  })
}

// 查询教练的内部对象
export function queryRefTrainManInnerObj(name) {
  return request({
    url: '/business/trainMan/ref',
    params: {
      name: name
    },
    method: 'get'
  })
}
